<?php //$Rev:: 55         $ // DO NOT REMOVE

function say_sayStuff(&$obj, $data)
{
    if ($text = $obj->core->module->aim_help_requested($data)) {
        $obj->core->utilities->aim_send_im($data['screenname'], $text, true);
    } else {
        /* send the message to the appropriate source */
        if ($data['message_type'] == AIM_MSG_CHAT) {
            $obj->core->chat->aim_chat_send($data['cid'], $data['message_text']);
        } else {
            $obj->core->utilities->aim_send_im($data['screenname'], $data['message_text'], true);
        }
    }
}

function sayto_sayStuff(&$obj, $data)
{
    if ($text = $obj->core->module->aim_help_requested($data)) {
        $obj->core->utilities->aim_send_im($data['screenname'], $text, true);
    } else {
        @list($to, $data['message_text']) = explode(' ', $data['message_text'], 2);
        $from = '<a href="aim:GoIm?screenname='.$data['screenname'].'">' . $data['screenname'] . '</a> wanted to say: %s';
        /* send the message to the appropriate source */
        if ($data['message_type'] == AIM_MSG_CHAT) {
            $obj->core->chat->aim_chat_send($data['cid'], sprintf($from, $data['message_text']));
        } else {
            $obj->core->utilities->aim_send_im($to, sprintf($from, $data['message_text']), true);
        }
    }
}

?>